// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import routes from './router'
import VueRouter from 'vue-router'
import store from './vuex/store'
import VueMaterial from 'vue-material'
import './config/rem'
import VueTouch from 'vue-touch'
import VueAwesomeSwiper from 'vue-awesome-swiper'
import 'mint-ui/lib/style.css'
import 'vue-material/dist/vue-material.css'
import 'material-design-icons/iconfont/material-icons.css'
import './../static/animate.css'
import { Loadmore, InfiniteScroll, Lazyload, Spinner, Range } from 'mint-ui'
import notie from 'notie'
import BaiduMap from 'vue-baidu-map'

Vue.use(BaiduMap, {
  ak: 'F11215e14fcab2c8af7107c3665b7017'
})

window.notie = notie

require('notie/dist/notie.min.css')

Vue.use(VueMaterial)
Vue.use(VueRouter)
Vue.use(Lazyload)
Vue.use(InfiniteScroll)
Vue.use(VueAwesomeSwiper)
VueTouch.config.swipe = {
  direction: 'horizontal'
}
Vue.use(VueTouch, {name: 'v-touch'})
Vue.component(Loadmore.name, Loadmore)
Vue.component(Spinner.name, Spinner)
Vue.component(Range.name, Range)
Vue.config.productionTip = false
/* eslint-disable no-new */
const router = new VueRouter({
  routes,
  strict: process.env.NODE_ENV !== 'production'
})
Vue.material.registerTheme('blue', {
  primary: 'blue',
  accent: 'pink',
  warn: 'red',
  background: 'white'
})
Vue.material.setCurrentTheme('blue')
new Vue({
  el: '#app',
  store,
  router,
  template: '<App/>',
  components: { App }
})
